package com.atguigu.jxc.domain;

import com.google.gson.Gson;

public class UtilVo {

    public static String toGson(Object object){
        return new Gson().toJson(object);
    }

    public static ServiceVO toService(Integer integer){
        ServiceVO serviceVO = null;
        if (integer!=null&&integer==1){
            serviceVO = new ServiceVO(100,"请求成功");
        }else {
            serviceVO = new ServiceVO(100,"请求失败");
        }
        return serviceVO;
    }
}
